import com.feng.spring5.bean.Course;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class bean1 {
    @Test
    public void test(){
        ApplicationContext context = new ClassPathXmlApplicationContext("bean1.xml");
        Course bean = context.getBean("course",Course.class);//注解如果没有指定bean的名字，默认为小写开头的类名。
        System.out.println(bean);
    }
}
